<template>
  <el-container>
    <el-header>
      <div class="sys-title">简书后台管理系统</div>
      <div class="header-right">
        <el-link>网站首页</el-link>
        <el-link>头像</el-link>
        <el-link>{{user.username}}-{{user.phone}}</el-link>
        <el-link>退出</el-link>
      </div>
    </el-header>
    <el-container>
      <el-aside width="200px">
        <el-menu router default-active="/admin/users/personal">
          <el-sub-menu index="/admin/users">
            <template #title>
              <span><el-icon :size="20"><avatar/></el-icon>个人中心</span>
            </template>
            <el-menu-item index="/admin/users/personal">个人资料</el-menu-item>
            <el-menu-item index="/admin/users/password">修改密码</el-menu-item>
          </el-sub-menu>
          <el-sub-menu index="/admin/article">
            <template #title>
              <span><el-icon><reading/></el-icon>文章管理</span>
            </template>
            <el-menu-item index="/admin/article/add">发布文章</el-menu-item>
            <el-menu-item index="/admin/article">文章列表</el-menu-item>
          </el-sub-menu>
          <el-menu-item index="/admin/comment">
            <template #title>
              <span><el-icon><chat-round/></el-icon>评论管理</span>
            </template>
          </el-menu-item>
          <el-menu-item index="/admin/fans">
            <template #title>
              <span><el-icon><magic-stick/></el-icon>粉丝管理</span>
            </template>
          </el-menu-item>
          <el-menu-item index="/admin/star">
            <template #title>
              <span><el-icon><pointer/></el-icon>点赞管理</span>
            </template>
          </el-menu-item>
        </el-menu>
      </el-aside>
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>
<script>
  import {mapGetters} from 'vuex'

  export default {
    computed: {
      ...mapGetters(['user'])
    }
  }
</script>

<style scoped>

</style>
